<%--
    Document   : mostrarCliente
    Author     : sebastiao
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" language="java"%>
<%@page import="model.UsuarioBean, javax.servlet.http.HttpSession "%>
<%@page import="model.VeiculoBean, javax.servlet.http.HttpSession "%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Mostra Usuario</title>
    </head>
    <body>
<%
    HttpSession sessao = request.getSession(true);
    try {
        UsuarioBean cliente = (UsuarioBean)sessao.getAttribute("usuario");
        if (cliente.getCpf() == null) {
            response.sendRedirect("login.jsp");
        } else {
            
            VeiculoBean veiculo =
%>
         <table style="text-align: left; width: 80%;" border="1" cellpadding="2" cellspacing="2" align="center">
            <tbody>
                <tr>
                    <td style="vertical-align: top; text-align: right;"><b>modelo: </b></td>
                    <td style="vertical-align: top; text-align: left;"><%= cliente.getNome() %></td>
                </tr>
                <tr>
                    <td style="vertical-align: top; text-align: right;"><b>Telefone: </b></td>
                    <td style="vertical-align: top; text-align: left;"><%= cliente.getTelefone() %></td>
                </tr>
                <tr>
                    <td style="vertical-align: top; text-align: right;"><b>CPF: </b></td>
                    <td style="vertical-align: top; text-align: left;"><%= cliente.getCpf() %></td>
                </tr>
                <tr>
                    <td style="vertical-align: top; text-align: right;"><b>Data de nascimento: </b></td>
                    <td style="vertical-align: top; text-align: left;"><%= cliente.getDataNascimento() %></td>
                </tr>
                <tr>
                    <td style="vertical-align: top; text-align: right;"><b>Usuario: </b></td>
                    <td style="vertical-align: top; text-align: left;"><%= cliente.getUsuario() %></td>
                </tr>
                <tr>
                    <td style="vertical-align: top; text-align: right;"><b>Senha: </b></td>
                    <td style="vertical-align: top; text-align: left;"><%= cliente.getSenha() %></td>
                </tr>
            </tbody>
         </table>
         <br>
         <h5><a href="locadoraVeiculos.jsp">Menu da Locadora</a></h5>
<%
        }
    } catch (Exception e) {
        e.printStackTrace( );
       response.sendRedirect("login.jsp");
    }
%>
    </body>
</html>
